<template>
	<view class="bg">
		<view v-for="(item, index) in dataArr" :key="index">
			<view class="info">
				<view class="info_item info_item_header">
					<view>报送时间</view>
					<view>{{ item.createTime }}</view>
				</view>
				<view class="info_item info_item_header">
					<view>报送人</view>
					<view>{{ item.createBy }}</view>
				</view>
				<view class="info_item info_item_header">
					<view>本年累计征地面积</view>
					<view>{{ item.yearLandAreaTotal }}（亩）</view>
				</view>
				<view class="info_item info_item_header">
					<view>累计征地面积</view>
					<view>{{ item.landAreaTotal }}（亩）</view>
				</view>
				<view class="info_item info_item_header">
					<view>本年累计拆迁面积</view>
					<view>{{ item.landAreaTotal }}（m²）</view>
				</view>
				<view class="info_item info_item_header">
					<view>累计拆迁面积</view>
					<view>{{ item.removeAreaTotal }}（m²）</view>
				</view>
				<view class="info_item info_item_header">
					<view>进度情况</view>
					<view>{{ item.imageProgress }}</view>
				</view>
				<view class="info_item info_item_header">
					<view>下一步计划</view>
					<view>{{ item.nextPlan }}</view>
				</view>
				<view class="info_item info_item_header">
					<view>存在问题</view>
					<view>{{ item.problems }}</view>
				</view>
			</view>
		</view>
		<u-loadmore :status="status" :icon-type="iconType" :load-text="loadText"></u-loadmore>
		<u-back-top :scroll-top="scrollTop"></u-back-top>
	</view>
</template>

<script>
	import {
		xmjzJztbRecord
	} from "@/request/zdxm.js"
	export default {
		data() {
			return {
				scrollTop: 0,
				id: null,
				name: '',
				dataArr: [],
				nowPage: 1,
				status: 'loadmore',
				iconType: 'flower',
				loadText: {
					loadmore: '轻轻上拉',
					loading: '努力加载中',
					nomore: '实在没有了'
				},
			};
		},
		onLoad(option) {
			this.id = option.id
			this.name = option.name
			this.xmjzJztbRecord()
		},
		onReady() {},
		onPageScroll(e) {
			this.scrollTop = e.scrollTop;
		},
		onReachBottom() {
			this.nowPage++
			this.status = 'loading';
			this.xmjzJztbRecord()
		},
		methods: {
			xmjzJztbRecord() {
				xmjzJztbRecord({
						id: this.id,
						column: 'createTime',
						order: 'desc',
						pageNo: this.nowPage,
						pageSize: '10',
					})
					.then((res) => {
						this.dataArr = res.data.result.details
						if (res.data.result.details.length < 10) {
							this.status = 'nomore'
						}
					})
			},

		},
	};
</script>

<style lang="scss" scoped>
	.info {
		width: 710rpx;
		margin: 0 auto;
		background: #ffffff;
		box-shadow: 0rpx 0rpx 24rpx 0rpx rgba(48, 116, 255, 0.1);
		border-radius: 8rpx;
		padding: 0 24rpx;
		margin-bottom: 20rpx;

		.info_item {
			display: flex;
			flex-flow: row nowrap;
			justify-content: flex-start;
			align-items: flex-start;
			padding: 16rpx 0;

			view:nth-child(1) {
				width: 210rpx;
				font-size: 24rpx;
				font-family: PingFang SC;
				font-weight: 400;
				color: #8e9cb3;
			}

			view:nth-child(2) {
				flex: 1;
				font-size: 28rpx;
				font-family: PingFang SC;
				font-weight: 400;
				color: #272b32;
				margin-left: 20rpx;
			}
		}

		.info_item_header {
			padding: 20rpx 0;
			font-size: 28rpx;
			font-family: PingFang SC;
			font-weight: bold;
			color: #272b32;
			border-bottom: 1rpx solid rgba(231, 233, 240, 1);

			view:nth-child(2) {
				font-size: 28rpx;
				font-family: PingFang SC;
				font-weight: bold;
				color: #272b32;
			}
		}
	}

	// .sub_title {
	// 	height: 95rpx;
	// 	line-height: 95rpx;
	// 	font-size: 28rpx;
	// 	font-family: PingFang SC;
	// 	font-weight: bold;
	// 	color: #272b32;
	// 	padding-left: 26rpx;
	// }

	.info2 {
		padding: 37rpx 31rpx;
	}

	.info2:last-child {
		margin-top: 40rpx;
	}

	// }
</style>
